import java.util.Scanner;

public class RemoveCharacters {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // 输入第一个字符串
        System.out.println("请输入第一个字符串:");
        String firstString = scanner.nextLine();

        // 输入第二个字符串
        System.out.println("请输入第二个字符串:");
        String secondString = scanner.nextLine();

        StringBuilder result = new StringBuilder();
        for (int i = 0; i < firstString.length(); i++) {
            char c = firstString.charAt(i);
            if (secondString.indexOf(c) == -1) {
                result.append(c);
            }
        }
        // 输出删除后的字符串
        System.out.println("删除后的字符串为: " + result.toString());

        scanner.close();
    }
}    